package cn.highedu.config;

import cn.highedu.service.ClientDao;
import cn.highedu.service.ClientService;
import cn.highedu.service.ClientServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

@Configuration
// @Profile 注解用于指定加载的配置文件的位置，这里指定的是开发环境的配置文件
@Profile("dev")
public class AppConfig {
    @Bean
    public ClientService clientService(){
        ClientServiceImpl clientService = new ClientServiceImpl();
        clientService.setClientDao( new ClientDao());
        return clientService;
    }
}
